<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: Target Projects</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('target_projects.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Target Projects </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1>Introduction</h1>
<p>The bootloader is built separately for each target device and board combination. This allows for compile-time customization of the bootloader.</p>
<h1>Directory Structure</h1>
<p>Target projects are stored in the top level <code>targets</code> directory. There is a subdirectory for each device. Inside the device directory is a directory for each toolchain and a <code>src</code> directory.</p>
<h1>Sources</h1>
<p>Each target must have several common source files:</p>
<ul>
<li><p class="startli"><code><a class="el" href="bootloader__config_8h_source.html">bootloader_config.h</a></code></p>
<p class="startli">Configuration macros, see below.</p>
</li>
<li><p class="startli"><code>clock_config_x.c</code></p>
<p class="startli">Clock configuration code.</p>
</li>
<li><p class="startli"><code>hardware_init_x.c</code></p>
<p class="startli">Board-specific hardware related functions.</p>
</li>
<li><p class="startli"><code>memory_map_x.c</code></p>
<p class="startli">Contains the memory map for the device.</p>
</li>
<li><p class="startli"><code>peripherals_x.c</code></p>
<p class="startli">Contains the peripheral descriptor array.</p>
</li>
</ul>
<p>(The "x" in the filenames above is replaced with the device name.)</p>
<h1>Configuration options</h1>
<p>The <code><a class="el" href="bootloader__config_8h_source.html">bootloader_config.h</a></code> file in the target source directory sets a number of macros used to configure the bootloader build. These can be defined here or in the build tool project file.</p>
<p><code>BL_TARGET_FLASH</code></p>
<p>Selects the flash-resident build.</p>
<p><code>BL_TARGET_RAM</code></p>
<p>Selects the RAM-resident (flashloader) build.</p>
<p><code>BL_MIN_PROFILE</code></p>
<p>Selects between the maximal and minimal configuration for the bootloader. Set to 1 for the minimal configuration.</p>
<p><code>BL_FEATURE_READ_MEMORY</code></p>
<p>Forces inclusion of read memory command under minimal configuration.</p>
<p><code>BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT</code></p>
<p>The default active peripheral detection timeout in milliseconds.</p>
<p><code>BL_HAS_MASS_ERASE</code></p>
<p>Set to 1 if the device has the ERSALLU flash controller command. Only certain new devices have this command.</p>
<p><code>BL_FLASH_VERIFY_DISABLE</code></p>
<p>Set to 1 to disable verification of erases and writes to flash memory.</p>
<p><code>BL_ENABLE_CRC_CHECK</code></p>
<p>Enable application CRC check on targets with hardware CRC support.</p>
<p><code>BL_UART_AUTOBAUD_IRQ</code></p>
<p>Set to 1 to use pin interrupts for autobaud, rather than polling.</p>
<p><code>BL_APP_VECTOR_TABLE_ADDRESS</code></p>
<p>The bootloader will check this address for the application vector table upon startup.</p>
<p><code>BL_FEATURE_POWERDOWN</code></p>
<p>Enables entering low power mode if no host communication.</p>
<p><code>BL_DEFAULT_POWERDOWN_TIMEOUT</code></p>
<p>Sets timeout for entering low power mode.</p>
<p><code>BL_FEATURE_FLASH_SECURITY</code></p>
<p>Set to 1 if target supports flash security features.</p>
<p><code>BL_FEATURE_ENCRYPTION</code></p>
<p>Set to 1 if target supports encrypted application image download.</p>
<p><code>BL_FEATURE_QSPI_MODULE</code></p>
<p>Set to 1 if target has QSPI support.</p>
<p>The following macros control the inclusion of specific host communication peripherals in the build. (See <code>peripherals_x.c</code>.)</p>
<p><code>BL_CONFIG_SCUART</code></p>
<p><code>BL_CONFIG_I2C</code></p>
<p><code>BL_CONFIG_DSPI</code></p>
<p><code>BL_CONFIG_USB_HID</code></p>
<p><code>BL_CONFIG_USB_MSC</code> </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
